package com.zusmart.test.plugin;

import java.lang.annotation.Annotation;

import com.zusmart.core.bean.BeanDefinitionRegistry;
import com.zusmart.core.context.ApplicationContext;
import com.zusmart.core.plugin.Plugin;
import com.zusmart.core.plugin.PluginManager;

public class EnableMonitorPlugin extends Plugin{

	public EnableMonitorPlugin(Annotation annotation, PluginManager pluginManager, BeanDefinitionRegistry beanDefinitionRegistry, ApplicationContext applicationContext) {
		super(annotation, pluginManager, beanDefinitionRegistry, applicationContext);
	}

	@Override
	protected void doStart() throws Exception {
		System.out.println("插件启动 --- >");
		this.getBeanDefinitionRegistry().attachBeanDefinition(Monitor.class);
	}

	@Override
	protected void doClose() throws Exception {
		System.out.println("插件关闭 --- >");
	}
	
}